#include <nodes/QNodeData>
#include <nodes/QFlowScene>
#include <nodes/QFlowView>

#include <QtWidgets/QApplication>

#include "ImageShowModel.hpp"
#include "ImageLoaderModel.hpp"

using Qt::QtDataModelRegistry;
using Qt::QtFlowScene;
using Qt::QtFlowView;

static std::shared_ptr<QtDataModelRegistry>
registerDataModels()
{
  auto ret = std::make_shared<QtDataModelRegistry>();
  ret->registerModel<ImageShowModel>();

  ret->registerModel<ImageLoaderModel>();

  return ret;
}


int
main(int argc, char *argv[])
{
  QApplication app(argc, argv);

  QtFlowScene scene(registerDataModels());

  QtFlowView view(&scene);

  view.setWindowTitle("QtNode-based flow editor");
  view.resize(800, 600);
  view.show();

  return app.exec();
}
